package com.itheima.advantagesup.mapper;

import com.itheima.advantagesup.entity.YddArticle;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface YddArticleMapper {
    /**
     * 模糊查询
     * @param start_time
     * @param end_time
     * @param title
     * @return {@link List}<{@link YddArticle}>
     */
    List<YddArticle> list(Long start_time,Long end_time, String title,Integer cateid);

    /**
     * 根据id查找文章
     * @param id
     * @return {@link YddArticle}
     */
    YddArticle getArticleById(String id);

    /**
     *根据id删除文章
     */
    @Delete("delete  from ydd_article where id = #{id}")
    void delete(String id);
}
